﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ATM.BUS;
using ATM.Entities;
using ATM.DAO;

namespace ATM.UnitTest
{
     [TestFixture()]
    public class ChangePinUT
    {
         private string pin1 = "111222", pin2 = "666666", pin3 = "";
         string cardNo = "111111111111AAAA";

         
         [TestCase]
         public void TestWrongOldPin()
         {
             Assert.AreEqual(ChangePinBUS.CheckOldPin(cardNo, pin1), false);
         }

         [TestCase]
         public void TestTrueOldPin()
         {
             Assert.AreEqual(ChangePinBUS.CheckOldPin(cardNo, pin2), true);
         }
         [TestCase]
         public void TestWrongUpdatePin()
         {
             Assert.AreEqual(ChangePinBUS.UpdatePIN(cardNo, pin3), 0);
         }
         [TestCase]
         public void TestTrueUpdatePin()
         {
             Assert.AreEqual(ChangePinBUS.UpdatePIN(cardNo, pin2), 1);
         }
    }
}
